//Free
package iBoxDB.fulltext;

import java.util.*;

class Util {

    final StringUtil sUtil = new StringUtil();

    public LinkedHashMap<Integer, KeyWord> fromString(long id, char[] str) {

        LinkedHashMap<Integer, KeyWord> kws = new LinkedHashMap<Integer, KeyWord>();

        for (int i = 0; i < str.length; i++) {
            char c = str[i];
            if (c == ' ') {
            } else {
                KeyWord k = new KeyWord();
                k.setID(id);
                k.setKeyWord(c);
                k.setPosition(i);
                kws.put(k.getPosition(), k);
            }
        }

        return kws;
    }

}
